import request from '@/utils/request';

export class loginSvr {

  baseurl: string = '';

  constructor() {
    this.baseurl = '/user/';
  }

  login(account: string, password: string) {
    return request.post(this.baseurl + 'login', {
      account: account,
      password: password,
    });
  }

  index() {
    return request.get(this.baseurl + 'index', null);
  }

  logout(id: string) {
    return request.post(this.baseurl + 'logout', {
      userId: id
    });
  }

}
